package com.dyava.commons.validate;

public class ValidateFloat extends Validate<Float,ValidateFloat> {

	public ValidateFloat(Float value, String name) {
		this.value = value;
		this.name = name;
	}

	
	public ValidateFloat gt(float value){
		if (checkNull()) return this;
		if(this.value>value){
			return this;
		}
		throw new ValidateFastException(name+"必须大于"+value);
	}
	
	public ValidateFloat lt(float value){
		if (checkNull()) return this;
		if(this.value<value){
			return this;
		}
		throw new ValidateFastException(name+"必须小于"+value);
	}
	
	public ValidateFloat ge(float value){
		if (checkNull()) return this;
		if(this.value>=value){
			return this;
		}
		throw new ValidateFastException(name+"必须大于等于"+value);
	}
	
	public ValidateFloat le(float value){
		if (checkNull()) return this;
		if(this.value<=value){
			return this;
		}
		throw new ValidateFastException(name+"必须小于等于"+value);
	}
	
	
	
	
}
